<?php
// $arr = array();
// $arr["host"] = "127.0.0.1";
// $arr["port"] = "6380";
// $arr["auth"] = "123456";

$selectedServer = $arr["selectedServer"];
$db = $arr["db"];
$auth = $arr["auth"];
$selectArr = explode(":",$selectedServer);
$host = $selectArr[0];
$port = $selectArr[1];

$redis = new \Redis();
$conResult = $redis->connect($host,$port);
if(!$conResult){
    echo "conError";
    exit;
}
$authResult = $redis->auth($auth);
if(!$authResult){
    echo "authError";
    exit;
}
$dbResult = $redis->select($db);
if(!$dbResult){
    echo "dbError";
    exit;
}
?>